const mutations = {
  setLogin(state, isLogin) {
    state.isLogin = isLogin;
  },
  setTEFn(state, TEFn) {
    state.TEFn = TEFn;
  },
  setIM(state, IM) {
    state.IM = IM;
  },
  setIMFn(state, IMFn) {
    state.IMFn = IMFn;
  },
  setUserInfo(state, userInfo) {
    state.userInfo = userInfo;
  },
  setRoomInfo(state, roomInfo) {
    state.roomInfo = roomInfo;
  },
  setTRTCFn(state, TRTCFn) {
    state.TRTCFn = TRTCFn;
  },
  setIMStatus(state, IMStatus) {
    state.IMStatus = IMStatus;
  },
  setIMStatus_initialization(state, info) {
    Object.assign(state.IMStatus[0], info);
  },
  setIMStatus_ready(state, info) {
    Object.assign(state.IMStatus[1], info);
  },
  setIMStatus_login(state, info) {
    Object.assign(state.IMStatus[2], info);
  },
  setIMStatus_join(state, info) {
    Object.assign(state.IMStatus[3], info);
  },


  setTRTCStatus(state, TRTCStatus) {
    state.TRTCStatus = TRTCStatus;
  },
  setTRTCStatus_initialization(state, info) {
    Object.assign(state.TRTCStatus[0], info);
  },
  setTRTCStatus_join(state, info) {
    Object.assign(state.TRTCStatus[1], info);
  },
  setTRTCStatus_loadRemote(state, info) {
    Object.assign(state.TRTCStatus[2], info);
  },
  setTRTCStatus_create(state, info) {
    Object.assign(state.TRTCStatus[3], info);
  },
  setTRTCStatus_push(state, info) {
    Object.assign(state.TRTCStatus[4], info);
  },
};

export default mutations;
